/** * @description: 处理率 */
<template>
  <div class="floor">
    <div class="title">
      <h6>{{ dealRateObj.title || '--' }}</h6>
      <span>{{ dealRateObj.titleRate || 0 }}%</span>
    </div>

    <div class="progress-wrapper" v-for="(item, index) of dealRateObj.children" :key="index">
      <div class="progress-text">
        <label>{{ item.title }}</label>
        <span>{{ item.ratio }}</span>
      </div>
      <van-progress :percentage="item.titleRate" :show-pivot="false" :stroke-width="6" color="#2E6CF6" track-color="#F4F6FA" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'DealRate',
  props: ['dealRateObj'],
}
</script>

<style lang="scss" scoped>
.floor {
  background: $bg-white;
  padding: 20px 12px;
  border-radius: 10px;
  margin-top: 12px;
  font-size: 16px;
  .title {
    @include fcb();
    color: $color-title;
    span {
      font-size: 20px;
      font-weight: bold;
      color: $color-title;
    }
  }
}

.progress-wrapper {
  margin-top: 20px;
  .progress-text {
    @include fcb();
    margin-top: 11px;
    margin-bottom: 12px;
    label {
      font-size: $fz14;
      color: $color-title;
      font-weight: normal;
    }
    span {
      font-size: $fz14;
      color: $color-title;
    }
  }
}
</style>
